﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

using RTGS.Library.Entities.Rtgs;
using RTGS.Library.DataAccess.Rtgs;
using System.Configuration;

namespace RTGS.Web.form.rtgs
{

  public partial class form_rtgs_member : BasePage
    {
        private string id = string.Empty;

        private  membertRepo tAccountDal = new membertRepo(ConfigurationManager.ConnectionStrings["Rtgs"].ConnectionString);
    
        protected void Page_Load(object sender, EventArgs e)
        {

            if (Request.Params["id"] != null)
            {
                id = Convert.ToString(Request.Params["id"]);
            }

            if (!Page.IsPostBack)
            {
                if (id.Trim().Length > 0) // Edit an existing item
                {
                    membert obj = tAccountDal.GetById(id);
                    if (obj != null)
                    {
                        hfID.Value = id.ToString();
                        txtMemberCode.Text = obj.memcde.Trim();
                        txtAccountBr.Text = obj.accnbr.Trim();
                        txtMemberName.Text = obj.memname.Trim();
                        txtBarcode1.Text = obj.brcde1.Trim();
                        txtBarcode2.Text = obj.brcde2.Trim();
                        txtBarcode3.Text = obj.brcde3.Trim();
                        txtBarcode4.Text = obj.brcde4.Trim();
                        txtBarcode5.Text = obj.brcde5.Trim();
                        
                        
                    }
                }
            }

        }

    }
}